<template>
    <div class="table">
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item>
                    <i class="el-icon-menu"></i>{{$route.name}}
                </el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="handle-box">
            <el-input placeholder="输入联系电话/用户名" class="search"></el-input>
            <el-select v-model="value2" placeholder="请选择用户类型" @change="onChange">
                <el-option v-for="(type,index) in userType" :key="index" :label="type.label" :value="type.value"></el-option>
            </el-select>
            <el-button type="primary" icon="search">搜索</el-button>
        </div>
        <div>
          <el-table border fit style="width: 100%">
              <el-table-column prop="name" :label="statusTable == 1 ? '机构名称' : statusTable == 2 ? '所属机构' : '公司名称'" show-overflow-tooltip>
              </el-table-column>
              <el-table-column v-if="statusTable == 2" prop="field" label="研究领域" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="intro" label="联系电话" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="lead" label="联系人" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="institutionSetting" label="邮箱" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="type" label="用户名" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="organizationType" label="密码" show-overflow-tooltip>
              </el-table-column>
              <el-table-column prop="territoryName" label="确认密码" show-overflow-tooltip>
              </el-table-column>

              <el-table-column fixed="right" label="操作">
                  <template slot-scope="scope">
                      <el-button type="text" size="small">禁用</el-button>
                      <el-button type="text" size="small">激活</el-button>
                      <el-button type="text" size="small">删除</el-button>
                  </template>
              </el-table-column>
          </el-table>
        </div>
        <!-- <div class="block">
            <el-pagination @current-change="handleCurrentChange" :current-page="page.number+1" layout="total, prev, pager, next, jumper" :total="page.totalElements">
            </el-pagination>
        </div> -->
    </div>
</template>
<script>
// import {  } from "../../server/getDate.js";
import { mapState, mapActions } from 'vuex'
import { getStore } from '../../utils/local.js'
import { confirm } from '../../utils/local'
export default {
    data() {
        return {
          userType: [{
            value: '1',
            label: '智库机构'
          }, {
            value: '2',
            label: '智库专家',
          }, {
            value: '3',
            label: '公司'
          }, {
            value: '4',
            label: '个人'
          }],
          value2: '1'
        }
        statusTable: ''
    },
    created() {

    },
    methods: {
      onChange(value){
        console.log(value)
        this.statusTable = value
      }
    }

}
</script>
<style lang="scss" scoped>
.handle-box {
  margin-bottom: 1%;
  .search {
    width: 30%;
  }
}

.block {
  text-align: center;
  margin-top: 1%;
}
</style>
